import React from 'react';
import { View, Text, processColor } from 'react-native';
import NativeCicleView from '../widget/NativeCircleView';
/**
 * 参考https://blog.csdn.net/lintcgirl/article/details/53489490
 */
export default class DetailScreen extends React.Component {
  static navigationOptions = {
    headerTitle: 'React嵌入NativeView'
  };
  constructor() {
    super();
    this.state = {
      radius: 50,
    };
  }
  render() {
    let that = this;
    setTimeout(() => {
      this.setState({
        radius: 100
      })
    }, 3000);
    return (
      <View>
        <NativeCicleView
          style={{ width: 300, height: 300 }}
          color={processColor('#ff0000')}
          radius={this.state.radius}
          onChangeMessage={() => {
            this.setState({
              radius: 70
            })
          }}
        />
      </View>
    )
  }
}